package com.whw.fy.service.impl;

import com.whw.fy.entity.Message;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.whw.fy.entity.Activ;
import com.whw.fy.mapper.ActivMapper;
import com.whw.fy.service.ActivService;
@Service
public class ActivServiceImpl implements ActivService{

    @Resource
    private ActivMapper activMapper;

    @Override
    public Message deleteByPrimaryKey(Integer activId) {
        return activMapper.deleteByPrimaryKey(activId)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message insert(Activ record) {
        return activMapper.insert(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message insertSelective(Activ record) {
        return activMapper.insertSelective(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message selectByPrimaryKey(Integer activId) {
        return Message.success(null).add(activMapper.selectByPrimaryKey(activId));
    }

    @Override
    public Message updateByPrimaryKeySelective(Activ record) {
        return activMapper.updateByPrimaryKeySelective(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message updateByPrimaryKey(Activ record) {
        return activMapper.updateByPrimaryKey(record)>0?Message.success(null):Message.fail(null);
    }

    @Override
    public Message selectAll() {
        return Message.success(null).add(activMapper.selectAll());
    }

}
